package com.gk.study.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@TableName("b_thing")
public class Thing implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    public Long id;
    
    @TableField
    public String title; // 新闻标题
    
    @TableField
    public String cover; // 封面图片
    
    @TableField
    public String description; // 新闻内容
    
    @TableField
    public String summary; // 新闻摘要
    
    @TableField
    public String source; // 新闻来源
    
    @TableField
    public String author; // 作者
    
    @TableField
    public Integer status; // 状态：1-正常，0-草稿，-1-删除
    
    @TableField
    public Integer isRecommend; // 是否推荐：0-否，1-是
    
    @TableField
    public Integer isTop; // 是否置顶：0-否，1-是
    
    @TableField
    public Integer pv; // 浏览量
    
    @TableField
    public Integer likeCount; // 点赞数
    
    @TableField
    public Integer collectCount; // 收藏数
    
    @TableField
    public Integer commentCount; // 评论数
    
    @TableField
    public BigDecimal score; // 评分
    
    @TableField
    public Long classificationId; // 分类ID
    
    @TableField
    public Long userId; // 发布用户ID
    
    @TableField
    public LocalDateTime publishTime; // 发布时间
    
    @TableField
    public LocalDateTime createTime; // 创建时间
    
    @TableField
    public LocalDateTime updateTime; // 更新时间

    @TableField(exist = false)
    public List<Long> tags; // 标签

    @TableField(exist = false)
    public MultipartFile imageFile;

    // Getters and Setters
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    
    public String getTitle() { return title; }
    public void setTitle(String title) { this.title = title; }
    
    public String getCover() { return cover; }
    public void setCover(String cover) { this.cover = cover; }
    
    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }
    
    public String getSummary() { return summary; }
    public void setSummary(String summary) { this.summary = summary; }
    
    public String getSource() { return source; }
    public void setSource(String source) { this.source = source; }
    
    public String getAuthor() { return author; }
    public void setAuthor(String author) { this.author = author; }
    
    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }
    
    public Integer getIsRecommend() { return isRecommend; }
    public void setIsRecommend(Integer isRecommend) { this.isRecommend = isRecommend; }
    
    public Integer getIsTop() { return isTop; }
    public void setIsTop(Integer isTop) { this.isTop = isTop; }
    
    public Integer getPv() { return pv; }
    public void setPv(Integer pv) { this.pv = pv; }
    
    public Integer getLikeCount() { return likeCount; }
    public void setLikeCount(Integer likeCount) { this.likeCount = likeCount; }
    
    public Integer getCollectCount() { return collectCount; }
    public void setCollectCount(Integer collectCount) { this.collectCount = collectCount; }
    
    public Integer getCommentCount() { return commentCount; }
    public void setCommentCount(Integer commentCount) { this.commentCount = commentCount; }
    
    public BigDecimal getScore() { return score; }
    public void setScore(BigDecimal score) { this.score = score; }
    
    public Long getClassificationId() { return classificationId; }
    public void setClassificationId(Long classificationId) { this.classificationId = classificationId; }
    
    public Long getUserId() { return userId; }
    public void setUserId(Long userId) { this.userId = userId; }
    
    public LocalDateTime getPublishTime() { return publishTime; }
    public void setPublishTime(LocalDateTime publishTime) { this.publishTime = publishTime; }
    
    public LocalDateTime getCreateTime() { return createTime; }
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }
    
    public LocalDateTime getUpdateTime() { return updateTime; }
    public void setUpdateTime(LocalDateTime updateTime) { this.updateTime = updateTime; }
    
    public List<Long> getTags() { return tags; }
    public void setTags(List<Long> tags) { this.tags = tags; }
    
    public MultipartFile getImageFile() { return imageFile; }
    public void setImageFile(MultipartFile imageFile) { this.imageFile = imageFile; }
}
